<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      "use strict";
      function Person() {
        if (new.target === undefined) {
          console.log("直接调用");
        } else {
          console.log(new.target === Person);
          console.log("new调用");
        }
      }
      Person(); // 直接调用
      new Person(); //new调用
    </script>
  </body>
</html>
